package com.kaf.ai.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

@Data
public class AiRequest {
    @NotBlank(message = "prompt 不能为空")
    private String prompt;

    @NotNull(message = "provider 不能为空")
    private String provider; // "DEEPSEEK" 或 "TONGYI"

    private List<Message> messages; // 支持多轮对话
    private Double temperature = 0.7;
    private Integer maxTokens = 512;

    @Data
    public static class Message {
        private String role; // "user", "assistant"
        private String content;

        public Message() {}

        public Message(String role, String content) {
            this.role = role;
            this.content = content;
        }
    }
}